<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class Parent {
        getName (cb) {
            console.log('张三')
            cb && cb()
        }
    }

    class Child extends Parent{
        getName = () => {
            super.getName(() => {

            })
            console.log('李四')
        }
    }

    const child = new Child()

    child.getName()
</script>
</body>
</html>